package cn.seaboot.admin.api.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import javax.validation.constraints.Size;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * POJO
 * 对象字段 [t_api_model_field]
 * @author Mr.css on 2018-6-20
 */
@Schema(description = "对象字段 [t_api_model_field] 实体类")
public class ApiModelField implements Serializable {

    private static final long serialVersionUID = -3661196134702416184L;
    /**
     * ID
     */
    @Schema(description = "ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;
    /**
     * 数值长度
     */
    @Schema(description = "数值长度")
    private Integer numericPrecision;
    /**
     * 数字小数长度
     */
    @Schema(description = "数字小数长度")
    private Integer numericScale;
    /**
     * 是否允许为空
     */
    @Schema(description = "是否允许为空")
    private Boolean nullable;
    /**
     * 样例
     */
    @Size(max = 65)
    @Schema(description = "样例")
    private String example;
    /**
     * 默认值
     */
    @Size(max = 64)
    @Schema(description = "默认值")
    private String defaultValue;
    /**
     * 工程ID
     */
    @Size(max = 32)
    @Schema(description = "工程ID")
    private String projectId;
    /**
     * 模型ID
     */
    @Schema(description = "模型ID")
    private Long modelId;
    /**
     * 全类名
     */
    @Size(max = 64)
    @Schema(description = "全类名")
    private String className;
    /**
     * 字段名
     */
    @Size(max = 64)
    @Schema(description = "字段名")
    private String fieldName;
    /**
     * 字段标签
     */
    @Size(max = 64)
    @Schema(description = "字段标签")
    private String fieldLabel;
    /**
     * 字段全类名
     */
    @Size(max = 64)
    @Schema(description = "字段全类名")
    private String fieldType;
    /**
     * 字段泛型
     */
    @Size(max = 64)
    @Schema(description = "字段泛型")
    private String fieldGeneric;
    /**
     * 对象类型
     */
    @Size(max = 32)
    @Schema(description = "对象类型")
    private String objectType;
    /**
     * 字符最大长度
     */
    @Schema(description = "字符最大长度")
    private Integer maxLength;

    private List<ApiModelRule> rules;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getNumericPrecision() {
        return numericPrecision;
    }

    public void setNumericPrecision(Integer numericPrecision) {
        this.numericPrecision = numericPrecision;
    }

    public Integer getNumericScale() {
        return numericScale;
    }

    public void setNumericScale(Integer numericScale) {
        this.numericScale = numericScale;
    }

    public Boolean getNullable() {
        return nullable;
    }

    public void setNullable(Boolean nullable) {
        this.nullable = nullable;
    }

    public String getExample() {
        return example;
    }

    public void setExample(String example) {
        this.example = example;
    }

    public String getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(String defaultValue) {
        this.defaultValue = defaultValue;
    }

    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    public Long getModelId() {
        return modelId;
    }

    public void setModelId(Long modelId) {
        this.modelId = modelId;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getFieldName() {
        return fieldName;
    }

    public void setFieldName(String fieldName) {
        this.fieldName = fieldName;
    }

    public String getFieldLabel() {
        return fieldLabel;
    }

    public void setFieldLabel(String fieldLabel) {
        this.fieldLabel = fieldLabel;
    }

    public String getFieldGeneric() {
        return fieldGeneric;
    }

    public void setFieldGeneric(String fieldGeneric) {
        this.fieldGeneric = fieldGeneric;
    }

    public String getFieldType() {
        return fieldType;
    }

    public void setFieldType(String fieldType) {
        this.fieldType = fieldType;
    }

    public String getObjectType() {
        return objectType;
    }

    public void setObjectType(String objectType) {
        this.objectType = objectType;
    }

    public Integer getMaxLength() {
        return maxLength;
    }

    public void setMaxLength(Integer maxLength) {
        this.maxLength = maxLength;
    }

    public List<ApiModelRule> getRules() {
        return rules;
    }

    public void setRules(List<ApiModelRule> rules) {
        this.rules = rules;
    }
}
